<template>
	<view class="retreat-container">
		<!-- 顶部标题 -->
		<view class="header">
			<image
				src="http://lbwnb123.oss-cn-beijing.aliyuncs.com/%E9%9D%92%E5%9F%8E/%E9%A6%96%E9%A1%B5/%E7%83%AD%E9%97%A8%E6%B4%BB%E5%8A%A8/PixPin_2025-05-28_23-22-22_compressed.png"
				mode="aspectFill" class="header-image"></image>
		</view>

		<!-- 价格信息 -->
		<view class="price-section">
			<view class="price-tag">
				<text class="original-price">￥2286</text>
			</view>
			<view class="sold-count">已售100件</view>
		</view>

		<!-- 抵扣信息 -->
		<view class="benefit-section">
			<view class="benefit-item">
				<text>抵扣</text>
				<text>积分最多可抵扣228.60元</text>
			</view>
			<view class="benefit-item">
				<text>活动</text>
				<text>送积分 购买最高可得2286积分</text>
			</view>
		</view>

		<!-- 下单须知 -->
		<view class="notice-section">
			<text class="notice-title">下单须知</text>
			<text class="notice-content">
				请用户仔细了解游学内容或下拉详情添加企微咨询后下单，下单后会有工作人员电话联系核对相关信息，根据用户提供信息采购对应所需的游学物品，固不予退款！请谨慎下单...
			</text>
		</view>



		<!-- 底部购买栏 -->
    <view class="purchase-bar">
      <view class="buy-btn" @click="handlePurchase">
        <text>立即购买</text>
      </view>
    </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods: {
			handlePurchase() {
				uni.showModal({
					title: '提示',
					content: '当前商品已售罄，请联系客服咨询',
					showCancel: false
				});
			}
		}
	};
</script>

<style lang="scss" scoped>
	.retreat-container {
		background-color: #f8f4e9;
		/* 浅米色背景 */
		min-height: 100vh;
		padding-bottom: 120rpx;
		/* 为底部购买栏留出空间 */
	}

	.header {
		padding: 40rpx 30rpx 20rpx;
		text-align: center;

		.header-image {
			width: 100%;
			display: block;
		}

		.main-title {
			font-size: 40rpx;
			font-weight: bold;
			color: #333;
			display: block;
			margin-bottom: 10rpx;
		}

		.sub-title {
			font-size: 28rpx;
			color: #666;
		}
	}

	.price-section {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 30rpx;
		background-color: #fff;
		margin: 20rpx;
		border-radius: 12rpx;

		.price-tag {
			.original-price {
				font-size: 36rpx;
				color: #f56c6c;
				font-weight: bold;
				margin-right: 20rpx;
			}

			.discount-price {
				font-size: 32rpx;
				color: #67c23a;
				font-weight: bold;
			}
		}

		.sold-count {
			font-size: 24rpx;
			color: #999;
		}
	}

	.benefit-section {
		background-color: #fff;
		margin: 0 20rpx 20rpx;
		border-radius: 12rpx;
		padding: 20rpx 30rpx;

		.benefit-item {
			display: flex;
			margin-bottom: 15rpx;
			font-size: 26rpx;

			text:first-child {
				color: #f56c6c;
				margin-right: 15rpx;
				font-weight: bold;
			}
		}
	}

	.notice-section {
		background-color: #fff;
		margin: 0 20rpx 20rpx;
		border-radius: 12rpx;
		padding: 25rpx;

		.notice-title {
			font-size: 30rpx;
			font-weight: bold;
			color: #333;
			display: block;
			margin-bottom: 15rpx;
		}

		.notice-content {
			font-size: 26rpx;
			color: #666;
			line-height: 1.6;
		}
	}

	.gallery-section {
		margin: 20rpx;

		.gallery-scroll {
			white-space: nowrap;
		}

		.gallery-image {
			width: 220rpx;
			height: 160rpx;
			border-radius: 8rpx;
			margin-right: 15rpx;
		}
	}

  .purchase-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100rpx;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center; /* 居中按钮 */
    box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.1);
    padding: 0 20rpx; /* 添加左右内边距 */

    .buy-btn {
      width: 100%; /* 宽度100%填满父容器 */
      max-width: 750rpx; /* 最大宽度限制 */
      height: 80rpx;
      background-color: #ff3c22; /* 改为海报中的棕色 */
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 36rpx;
      font-weight: bold;
      border-radius: 40rpx; /* 圆角效果 */
      box-shadow: 0 4rpx 12rpx rgba(139, 90, 43, 0.3); /* 添加阴影效果 */

      /* 按钮点击效果 */
      &:active {
        background-color: #6D4722;
        transform: translateY(2rpx);
      }
    }
  }
</style>
